/**
 * tzdesk系统平台
 * moonvip_admin
 * com.tz.service.message
 * ImessageService.java
 * 创建人:小胡 
 * 时间：2016年12月04日 10:13:57
 *
 */
package com.tz.service.message.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tz.bean.message;
import com.tz.bean.TzParams;
import com.tz.dao.message.ImessageMapper;
import com.tz.service.message.ImessageService;
import com.tz.util.TmStringUtils;

/**
 * 角色管理serviceImpl
 * ImessageService
 * 创建人:小胡 
 * 时间：2016年12月04日 10:13:57
 * @version 1.0.0
 * 
 */
@Service
public class messageServiceImpl implements ImessageService{

	@Autowired
	private ImessageMapper messageMapper;
	
	@Override
	public List<message> findmessages(TzParams params){
		if(TmStringUtils.isEmpty(params.getOrder()))params.setOrder("create_time desc");
		return messageMapper.findmessages(params);
	}
	
	@Override
	public int count(TzParams params) {
		return messageMapper.count(params);
	}

	@Override
	public message getmessage(Integer id) {
		return messageMapper.getmessage(id);
	}

	@Override
	public int save(message message) {
		return messageMapper.save(message);
	}

	@Override
	public int update(message message) {
		return messageMapper.update(message);
	}

	@Override
	public int delete(TzParams params) {
		return messageMapper.delete(params);
	}
}
